<!doctype html>
<html lang="en">
<head>
    <title>FEATSKY Best-1.0</title>
    <meta charset="UTF-8">
    <meta name="keywords" content="featsky,featsky博客,641151096"/>
    <meta name="description" content="featsky的个人博客,641151096的个人博客"/>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

    <link rel="stylesheet" href="../../src/css/base.css">
    <link rel="stylesheet" href="art_detail.css">
</head>
<body>

    <div class="com-art-toggle">

        <header>
            <img id="logo" src="../../img/logo.png" alt="">
            <ul class="nav-list fx-col-b">
                <li></li>
                <li></li>
                <li></li>
            </ul>
            <h4 class="titles">文章详情</h4>
        </header>

        <div class="container">
            <section id="art-item" class="pd15">
                <h3 data-name="title" class="fw">宇宙最诡异时空 人类所有定律竟全部失效！</h3>
                <div class="mt7 c6">
                    <span data-name="author">Featsky</span>
                    <span data-name="time">2015.02.16</span>
                </div>

                <div id="content">
                    <p>1.众所周知，超大质量黑洞是宇宙中的恐怖天体，有句话说在我们生活在光锥之内，光锥之外的宇宙我们是无法得知的。那么黑洞内部的时空就有可</p>
                    <p>2.f放水电费水电费</p>
                    <img src="img/1.jpg" alt="">
                    <p>法师打发第三方</p>
                    <p>冯绍峰的所得税法</p>
                    <p>法师打发第三方</p>
                    <p>冯绍峰的所得税法</p>
                    <p>法师打发第三方</p>
                    <p>冯绍峰的所得税法</p>
                    <p>法师打发第三方</p>
                    <p>冯绍峰的所得税法</p>
                    <p>法师打发第三方</p>
                    <p>法师打发第三方</p>
                </div>
            </section>
        </div>
    </div>

    <script src="../../src/lib/zepto.min.js"></script>
    <script src="../../src/js/common.js"></script>
    <script src="../../src/js/ajax.js"></script>
    <script>
        $(function(){

            var w = JSON.parse(localStorage.getItem('device'));

            $('#art-item').css('height', w.h + 'px');

            function renderArticle(){

                app.ajax('get',app.url('getArticleDetail.php'),{id:5},function(data){

                    var obj = data;

                    console.log(obj)

                    var dataNameList = $('#art-item').find("[data-name]");

                    for(var i=0;i<dataNameList.length;i++){

                        var dataObj = $(dataNameList[i]);

                        dataObj.text(obj[dataObj.attr('data-name')]);

                    }

                    $('#art-item').find('#content').html(obj.text);

                })
            }

            renderArticle()

        })
    </script>

</body>
</html>





